/******************************************************************************
 * 
 * Announce: CSharpKit, Basic algorithms, components and definitions.
 *           Copyright (C) ShenYongchen.
 *           All rights reserved.
 *   Author: 申永辰.郑州 (shenyczz@163.com)
 *  WebSite: http://gitee.com/shenyczz/csharp_csk
 *
 * THIS CODE IS LICENSED UNDER THE MIT LICENSE (MIT).
 * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 
 * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
 * IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
 * PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
 * 
******************************************************************************/

using System;
using System.Runtime.InteropServices;

namespace CSharpKit.Native.ECCODES
{
    partial class eccodes
    {
        /// <summary>
        /// 原型: codes_fieldset* codes_fieldset_new_from_files(codes_context* c, 
        ///              char* filenames[], int nfiles, 
        ///              char** keys, int nkeys,
        ///              const char* where_string, const char* order_by_string, int* err); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="c"></param>
        /// <param name="filenames"></param>
        /// <param name="nfiles"></param>
        /// <param name="keys"></param>
        /// <param name="nkeys"></param>
        /// <param name="where_string"></param>
        /// <param name="order_by_string"></param>
        /// <param name="err"></param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_new_from_files")]
        public extern static IntPtr codes_fieldset_new_from_files(IntPtr c,
                                        string[] filenames, int nfiles,
                                        string[] keys, int nkeys,
                                        in string where_string,
                                        in string order_by_string,
                                        IntPtr err
                                        );


        /// <summary>
        /// 原型: void codes_fieldset_delete(codes_fieldset* set); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="fieldset">codes_fieldset*</param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_delete")]
        public extern static void codes_fieldset_delete(IntPtr fieldset);

        /// <summary>
        /// 原型: void codes_fieldset_rewind(codes_fieldset* set); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="fieldset">codes_fieldset*</param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_rewind")]
        public extern static void codes_fieldset_rewind(IntPtr fieldset);

        /// <summary>
        /// 原型: int codes_fieldset_apply_order_by(codes_fieldset* set, const char* order_by_string); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="fieldset"></param>
        /// <param name="order_by_string"></param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_apply_order_by")]
        public extern static int codes_fieldset_apply_order_by(IntPtr fieldset, in string order_by_string);

        /// <summary>
        /// 原型: codes_handle* codes_fieldset_next_handle(codes_fieldset* set, int* err); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="fieldset"></param>
        /// <param name="err"></param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_next_handle")]
        public extern static IntPtr codes_fieldset_next_handle(IntPtr fieldset, IntPtr err);

        /// <summary>
        /// 原型: int codes_fieldset_count(codes_fieldset* set); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="fieldset"></param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_fieldset_count")]
        public extern static int codes_fieldset_count(IntPtr fieldset);

        // {{END}}
    }

}
